package com.maxie.duck.demo.entity;

import com.maxie.duck.demo.behaviver.Flyable;
import com.maxie.duck.demo.behaviver.Qucakable;

public abstract class Duck {

    protected Flyable flyable;

    protected Qucakable qucakable;

    public Duck(){}

    public void setFlyable(Flyable flyable) {
        this.flyable = flyable;
    }
    public void setQucakable(Qucakable qucakable) {
        this.qucakable = qucakable;
    }
    public void perfectFly() {
        flyable.fly();
    }

    public void perfectQucak() {
        qucakable.qucak();
    }

    /**
     * 🦆鸭子的描述
     */
    public abstract void display();
}

